package com.fivetiger.controller;

import com.fivetiger.entity.Accident;
import com.fivetiger.entity.Training;
import com.fivetiger.service.inte.AccidentService;
import com.fivetiger.service.inte.TrainingService;
import com.fivetiger.vo.PageBean;
import com.fivetiger.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @date 2021/6/18 - 8:31
 */
@Controller
@RequestMapping("/api/accident/")
public class AccidentController {
    @Autowired
    private AccidentService service;
    //新增训练项目
    @RequestMapping("save.do")
    @ResponseBody
    public R save(Accident accident){
        return service.save(accident);
    }

    //查询宠物训练信息
    @RequestMapping("all.do")
    @ResponseBody
    public PageBean all(){
        return service.queryList();
    }
}
